package log4j2;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

public class Hello {

	public static Logger logger = LogManager.getLogger(Hello.class.getName());
	
	public void hello(){
		logger.traceEntry();
		logger.trace("trace", new NullPointerException("空指针异常"));
		logger.debug("debug", new NullPointerException("空指针异常"));
		logger.info("info", new NullPointerException("空指针异常"));
		logger.warn("warn", new NullPointerException("空指针异常"));
		logger.error("error", new NullPointerException("空指针异常"));
		logger.fatal("fatal", new NullPointerException("空指针异常"));
		logger.traceExit();
	}
	
	public static void main(String[] args) {
		
		Hello h = new Hello();
		h.hello();
	}
}
